<template>
  <el-form ref="form" :model="form" label-width="200px">
    <el-form-item label=" 企业名称">
      <el-input v-model="form.name" disabled />
    </el-form-item>
    <el-form-item label=" 公司地址">
      <el-input v-model="form.companyAddress" disabled />
    </el-form-item>
    <el-form-item label=" 公司电话">
      <el-input v-model="form.companyPhone" disabled />
    </el-form-item>
    <el-form-item label=" 邮箱">
      <el-input v-model="form.mailbox" disabled />
    </el-form-item>
    <el-form-item label=" 备注">
      <el-input v-model="form.remarks" disabled />
    </el-form-item>
  </el-form>
</template>

<script>
// 导入接口
import { getCompanyById } from '@/api/setting'
// map辅助函数
import { mapGetters } from 'vuex'
export default {
  data() {
    return {
      form: {}
    }
  },
  computed: {
    ...mapGetters(['companyId'])
  },
  async created() {
    // 调用接口获取公司信息
    const res = await getCompanyById(this.companyId)
    // console.log('res:', res)
    this.form = res
  }
}
</script>

<style></style>
